﻿using System;
using System.Collections.Generic;
using O1.Social.Newsgator.Business.Interfaces;
using O1.Social.Newsgator.Domain.Interfaces;
using O1.Social.Newsgator.Repository;
using O1.Social.Newsgator.Repository.LinqToSql;

namespace O1.Social.Newsgator.Business
{
    public class ActivityEventBusiness : IActivityEventBusiness
    {
        private readonly IActivityEventRepository m_Repository;

        public ActivityEventBusiness()
            : this(new ActivityEventRepository())
        {
        }

        public ActivityEventBusiness(IActivityEventRepository repository)
        {
            m_Repository = repository;
        }

        #region Implementation of IActivityEventBusiness

        public IList<IActivityEvent> GetEvents(DateTime date)
        {
            return m_Repository.GetFromDate(date);
        }

        #endregion
    }
}
